<template>
  <div>
    <el-button plain @click="open1">成功</el-button>
    <el-button :plain="true" @click="open2">警告</el-button>
    <el-button :plain="true" @click="open3">消息</el-button>
    <el-button :plain="true" @click="open4">错误</el-button>
  </div>
</template>


<script>
export default {
  name: "NotificationView",
  methods: {
    open1() {
      this.$notify.success('成功通知')
    },
    open2() {
      this.$notify.warning({
        title: '警告',
        message: '警告信息'
      })
    },
    open3() {
      this.$notify({
        title: '信息',
        message: '普通信息',
        type: 'info'
      })
    },
    open4() {
      this.$notify({
        title: '错误',
        message: '错误信息',
        type: 'error',
        onClose: () => {
          console.log('错误信息提示关闭')
        },  // 信息关闭后的回调
        showClose: true,   // 显示关闭按钮
        position: 'bottom-left'  // 提示信息位置
      })
    }
  }
}
</script>


<style scoped>

</style>